package org.angelica.modules.account.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

/**
 * <p>
 * 权限表
 * </p>
 *
 * @author aizhimin
 * @since 2019-05-13
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("acc_permission")
public class AccPermissionDO {

    private Long id;
    /**
     * //权限名称
     */
    private String permName;
    /**
     * //权限字符串编码：命名规则：mudule:menu:operate
     */
    private String permCode;
    /**
     * //父权限ID
     */
    private Long parentId;
    /**
     * //优先级：越大越靠前
     */
    private Integer priority;
    private Date gmtCreate;
    private Date gmtModified;

    /**
     * //treeselect 使用字段，key=id
     */
    @TableField(exist = false)
    private String key;
    /**
     * //treeselect 使用字段，title=permName
     */
    @TableField(exist = false)
    private String title;
    /**
     * //treeselect 使用字段，value=id
     */
    @TableField(exist = false)
    private String value;
    @TableField(exist = false)
    private List<AccPermissionDO> children;
}
